/*日期与时间*/
var tmpArr = new Array("星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六");

function setDate() {
    var myDate = new Date();
    var temp = myDate.getFullYear() + "年";
    temp += (myDate.getMonth() + 1) + '月';
    temp += myDate.getDate() + '日';
    temp += tmpArr[myDate.getDay()] + '';
    temp += myDate.getHours() + '时';
    temp += myDate.getMinutes() + '分';
    temp += myDate.getSeconds() + '秒';

    document.getElementById('time').innerHTML = temp;
    window.setTimeout(setDate, 1000);
};
window.onload = function () {
    setDate();
};